# -*- coding: utf-8 -*-
import tkinter as tk  

root = tk.Tk()
 

root.title('Grid_demo')
root.geometry('500x400') 
 
tk.Label(root, text='P', bg='red').pack(side='top')    # 上
tk.Label(root, text='P', bg='red').pack(side='bottom') # 下
tk.Label(root, text='P', bg='red').pack(side='left')   # 左
tk.Label(root, text='P', bg='red').pack(side='right')  # 右
root.mainloop()